partcount = 0 surfacechange = false function rotation() local n1 = 0 local n2 = 0 local n3 = 0 local ntable = {n1, n2, n3} local rng = 0 local somenumber = 10 local othernumber = 1 local anothernumber = 0 while true do if math.random(1, somenumber) > 1 then rng = rng + 1 somenumber = somenumber - 1 else break end end if rng == 9 then othernumber = 3 elseif rng >= 5 then othernumber = 2 end for i, v in ipairs(ntable) do ntable[i] = math.random(-180, 179) anothernumber = anothernumber + 1 if anothernumber == othernumber then n1, n2, n3 = unpack(ntable) break end end if part then part.Orientation = Vector3.new(n1, n2, n3) end end function transparency() local n = math.random(0, 100) n = n / 100 if part then part.Transparency = n end end function reflectance() local n = math.random(0, 100) n = n / 100 if part then part.Reflectance = n end end function material() local n = math.random(1, #Enum.Material:GetEnumItems()) if part then part.Material = Enum.Material:GetEnumItems()[n] end end function surface() local n = math.random(1, #Enum.SurfaceType:GetEnumItems()) if part then for i, v in ipairs(Enum.NormalId:GetEnumItems()) do part[tostring(v.Name.."Surface")] = Enum.SurfaceType:GetEnumItems()[n] end end end ---function decals() --local decals = {11818627075} --local n = math.random(1, #decals) --local dfaces = Enum.NormalId:GetEnumItems() --if part then -- local rng = math.random(1, #dfaces) --local decal = Instance.new("Decal") --decal.Texture = "http://www.roblox.com/asset/?id="..decals[n] --decal.Face = dfaces[rng] --decal.Parent = part --end --end function randomsurfaces() local surfacecount = 0 while surfacecount < 6 do local n = math.random(1, #Enum.SurfaceType:GetEnumItems()) if part then local a = Enum.NormalId:GetEnumItems() part[tostring(a[surfacecount + 1].Name.."Surface")] = Enum.SurfaceType:GetEnumItems()[n] surfacecount = surfacecount + 1 end end end function effect() local effecttable = {"Fire", "Smoke", "Sparkles", "ParticleEmitter"} local n = math.random(1, #effecttable) if part then local effect = Instance.new(effecttable[n]) effect.Parent = part if effect:IsA("Fire") then effect.Size = math.random(10, 20) effect.Color = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255)) effect.SecondaryColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255)) elseif effect:IsA("Smoke") then effect.RiseVelocity = math.random(1, 5) elseif effect:IsA("Sparkles") then effect.SparkleColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255)) elseif effect:IsA("ParticleEmitter") then effect.Color = ColorSequence.new(Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))) effect.Speed = NumberRange.new(1, math.random(1, 3)) effect.SpreadAngle = Vector2.new(360, 360) end end end specmods = { {rarity = 8, func = rotation}, {rarity = 10, func = transparency}, {rarity = 10, func = reflectance}, {rarity = 10, func = material}, {rarity = 10, func = surface}, {rarity = 50, func = randomsurfaces}, {rarity = 50, func = effect} } while partcount < 1000 do surfacechange = false part = Instance.new("Part") part.Parent = game.ServerStorage part.Anchored = true part.CastShadow = false part.Color = Color3.new(math.random(0, 255), math.random(0, 255), math.random(0, 255)) sizes = {1, 1, 1} sizecount = 0 while sizecount < 3 do local n = 1 while true do local amount1 = 4 local amount2 = 2 if math.random(1, amount1) == 1 then sizes[sizecount + 1] = n sizecount = sizecount + 1 n = 1 break else n = n + 1 end if n == amount2 then amount1 = amount1 + 1 amount2 = amount2 * 2 - 1 end end end part.Size = Vector3.new(sizes[1], sizes[2], sizes[3]) part.Position = Vector3.new(math.random(-100, 100), math.random(0, 200), math.random(-100, 100)) part.TopSurface = "Smooth" part.BottomSurface = "Smooth" for i, v in ipairs(specmods) do if math.random(1, v.rarity) == 1 then v.func() end end part.Parent = workspace partcount = partcount + 1 end